package com.ymtms.arrivalofgoods.controller;

import com.ymtms.arrivalofgoods.bo.GridResult;
import com.ymtms.arrivalofgoods.pojo.BillDetailed;
import com.ymtms.arrivalofgoods.service.BillDetailedService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.ArrayList;
import java.util.List;

@Controller
public class BillDetailedController {
    @Autowired
    BillDetailedService billDetailedService;
    @RequestMapping("/showAllBillDetailed")
    @ResponseBody
    public GridResult<BillDetailed> shallAllBillDetailed(@RequestParam(value = "page",required = false,defaultValue = "1") Integer currentPage,
                                                         @RequestParam(value = "limit",required = false,defaultValue = "10") Integer pageSize,
                                                         @RequestParam(value = "key[id]",required = false) String condition){
        GridResult gridResult = new GridResult();
        gridResult = billDetailedService.showBillDetailedByCondition(currentPage,pageSize,condition);
        gridResult.setCode(0);
        gridResult.setMsg("test");
        return  gridResult;
    }
}